package TestData.DataStructureTestData.treeTestData.binaryTreeTestData;

import DataStructure.tree.binaryTree.binaryTreeImpl.BinaryTreeImpl;
import Logic.constant.C;

/**
 * @author liujun
 * @date 2020-02-18 19:02
 * @description 树 数据结构 的测试用例
 */
public class BinaryTreeTestDemo {

    public static BinaryTreeImpl binaryTreeImplDemo1 = null;
    public static BinaryTreeImpl binaryTreeImplDemo2 = null;
    public static BinaryTreeImpl binaryTreeImplDemo3 = null;
    public static BinaryTreeImpl binaryTreeImplDemo4 = null;

    //按照S形打印的数组
    public static int[] treeArray01s = {};
    public static int[] treeArray02s = {};
    public static int[] treeArray03s = {1, 2, 3, 7, 6, 5, 4};
    public static int[] treeArray04s = {
                       1,
              2,                     3,
            7, C.NullLeaf, C.NullLeaf, 4};

    public static int[] treeArray05s = {
                                                                          1,
                                          2,                                                       3,
                              8,                    7,                                 6,                     4,
                            9, C.NullLeaf, C.NullLeaf, C.NullLeaf, 10,        11,             12,          C.NullLeaf, C.NullLeaf,
                        5, C.NullLeaf,                   C.NullLeaf, 16,              15, C.NullLeaf,      13,                            14,
               C.NullLeaf, C.NullLeaf,                      C.NullLeaf, 17, C.NullLeaf, C.NullLeaf,      20, C.NullLeaf, C.NullLeaf,    18, C.NullLeaf,
                                                               C.NullLeaf, C.NullLeaf,                 19, C.NullLeaf,
                                                                                              C.NullLeaf, C.NullLeaf,};

    //层次遍历的数组
    public static int[] treeArray01 = {};
    public static int[] treeArray02 = null;
    public static int[] treeArray03 = {
                                                          1,
                                 2,                                              3,
                      4,                      5,                     6,                       7,
            C.NullLeaf, C.NullLeaf, C.NullLeaf, C.NullLeaf, C.NullLeaf, C.NullLeaf, C.NullLeaf, C.NullLeaf
    };
    public static int[] treeArray04 = {
                                                 1,
                           2,                                           3,
                      4,     C.NullLeaf,                      C.NullLeaf,      7,
            C.NullLeaf, C.NullLeaf,                                 C.NullLeaf, C.NullLeaf};

    public static int[] treeArray05 = {
                                                                         1,
                                   2,                                                                              3,
                         4,                     6,                                     7,                                                         8,
                       9, C.NullLeaf, C.NullLeaf, C.NullLeaf,                         10,                    11,                          12,            C.NullLeaf,
                    13, C.NullLeaf,                                     1,                       5,       16, C.NullLeaf,        C.NullLeaf, 5,
            C.NullLeaf, 14,                                   C.NullLeaf, C.NullLeaf,  C.NullLeaf, 17,                C.NullLeaf, C.NullLeaf,                       20,  C.NullLeaf,
                C.NullLeaf, C.NullLeaf,                                              18, C.NullLeaf,                                           C.NullLeaf, 19,
            C.NullLeaf, C.NullLeaf, C.NullLeaf
    };

    public static int[] treeArray06 = {
             1,
            2, 3,
            C.NullLeaf, 4, 5, C.NullLeaf,
            C.NullLeaf, C.NullLeaf, 8, C.NullLeaf
    };


    //先序遍历的数组
    public static int[] treeArray03Preorder = {1, 2, 4, 5, 3, 6, 7};
    public static int[] treeArray03Preorder_Symbol = {1, 2, 4, C.NullLeaf, C.NullLeaf, 5, C.NullLeaf, C.NullLeaf, 3, 6, C.NullLeaf, C.NullLeaf, 7, C.NullLeaf, C.NullLeaf};
    public static int[] treeArray04Preorder = {1, 2, 4, 3, 7};
    public static int[] treeArray04Preorder_Symbol = {1, 2, 4, C.NullLeaf, C.NullLeaf, C.NullLeaf, 3, C.NullLeaf, 7, C.NullLeaf, C.NullLeaf};
    public static int[] treeArray05Preorder = {1, 2, 4, 9, 13, 14, 6, 3, 7, 10, 15, 16, 17, 18, 19, 11, 8, 12, 5, 20};
    public static int[] treeArray05Preorder_Symbol = {1, 2, 4, 9, 13, 14, C.NullLeaf, C.NullLeaf, C.NullLeaf, C.NullLeaf, C.NullLeaf, 6, C.NullLeaf, C.NullLeaf,
            3, 7, 10, 15, C.NullLeaf, C.NullLeaf, 16, 17, C.NullLeaf, 18, 19, C.NullLeaf, C.NullLeaf, C.NullLeaf, C.NullLeaf, 11, C.NullLeaf, C.NullLeaf, 8, 12,
            5, C.NullLeaf, 20, C.NullLeaf, C.NullLeaf, C.NullLeaf, C.NullLeaf};

    //中序遍历的数组
    public static int[] treeArray03Inorder = {4, 2, 5, 1, 6, 3, 7};
    public static int[] treeArray03Inorder_Symbol = {C.NullLeaf, 4, C.NullLeaf, 2, C.NullLeaf, 5, C.NullLeaf, 1, C.NullLeaf, 6, C.NullLeaf, 3, C.NullLeaf, 7, C.NullLeaf};
    public static int[] treeArray04Inorder = {4, 2, 1, 3, 7};
    public static int[] treeArray04Inorder_Symbol = {C.NullLeaf, 4, C.NullLeaf, 2, C.NullLeaf, 1, C.NullLeaf, 3, C.NullLeaf, 7, C.NullLeaf};
    public static int[] treeArray05Inorder = {14, 13, 9, 4, 2, 6, 1, 15, 10, 17, 19, 18, 16, 7, 11, 3, 5, 20, 12, 8};
    public static int[] treeArray05Inorder_Symbol = {C.NullLeaf, 14, C.NullLeaf, 13, C.NullLeaf, 9, C.NullLeaf, 4, C.NullLeaf, 2, C.NullLeaf,
            6, C.NullLeaf, 1, C.NullLeaf, 15, C.NullLeaf, 10, C.NullLeaf, 17, C.NullLeaf, 19, C.NullLeaf, 18, C.NullLeaf, 16, C.NullLeaf,
            7, C.NullLeaf, 11, C.NullLeaf, 3, C.NullLeaf, 5, C.NullLeaf, 20, C.NullLeaf, 12, C.NullLeaf, 8, C.NullLeaf};

    //后序遍历的数组
    public static int[] treeArray03Postorder = {4, 5, 2, 6, 7, 3, 1};
    public static int[] treeArray03Postorder_Symbol = {C.NullLeaf, C.NullLeaf, 4, C.NullLeaf, C.NullLeaf, 5, 2, C.NullLeaf, C.NullLeaf, 6, C.NullLeaf, C.NullLeaf, 7, 3, 1};
    public static int[] treeArray04Postorder = {4, 2, 7, 3, 1};
    public static int[] treeArray04Postorder_Symbol = {C.NullLeaf, C.NullLeaf, 4, C.NullLeaf, 2, C.NullLeaf, C.NullLeaf, C.NullLeaf, 7, 3, 1};
    public static int[] treeArray05Postorder = {14, 13, 9, 4, 6, 2, 15, 19, 18, 17, 16, 10, 11, 7, 20, 5, 12, 8, 3, 1};
    public static int[] treeArray05Postorder_Symbol = {C.NullLeaf, C.NullLeaf, 14, C.NullLeaf, 13, C.NullLeaf, 9, C.NullLeaf, 4,
            C.NullLeaf, C.NullLeaf, 6, 2, C.NullLeaf, C.NullLeaf, 15, C.NullLeaf, C.NullLeaf, C.NullLeaf, 19, C.NullLeaf, 18, 17, C.NullLeaf, 16, 10,
            C.NullLeaf, C.NullLeaf, 11, 7, C.NullLeaf, C.NullLeaf, C.NullLeaf, 20, 5, C.NullLeaf, 12, C.NullLeaf, 8, 3, 1};

    //创建满二叉树
    public static int[] treeArray01full = null;
    public static int[] treeArray02full = {};
    public static int[] treeArray03full = {1};
    public static int[] treeArray04full = {1, 2, 3};
    public static int[] treeArray05full = {1, 2, 3, 4, 5, 6, 7, 8, 9};
}
